<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Detalhar</title>

<c:import url="/templates/preCabecalho.jsp"></c:import>

<link href="${pageContext.request.contextPath}/resources/css/clinica/detalharClinica.css" type="text/css" rel="stylesheet"/>

<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/clinica/detalharClinicaFormulario.js"></script>
</head>
<body>
	
	<div class="tabela_clinica" id="listaEmails">
		<table border="2px">
			<thead>
				<tr>
					<th>Emails</th>
				</tr>
			</thead>
			<tbody>
			  <c:if test="${not empty listaEmails}">
				<c:forEach var="email" items="${listaEmails}" varStatus="i">
				
					<c:if test="${i.count % 2 eq 0}">
						<tr class="registro_clinica1">
						
						<td>${email.emailClinica}</td>
						
						</tr>
					</c:if>
					
					<c:if test="${i.count % 2 ne 0}">
						<tr class="registro_clinica2">
						
						<td>${email.emailClinica}</td>
						
					</tr>
					
					</c:if>
				
				</c:forEach>
			  </c:if>
			  <c:if test="${empty listaEmails}">
			  	Nenhum Registro de emails encontrado
			  </c:if>
			</tbody>
		</table>
	</div>
	
		<div class="tabela_clinica" id="listaTelefones">
		<table border="2px">
			<thead>
				<tr>
					<th>Telefone</th>
					<th>DDD</th>
					<th>Tipo Telefone</th>
				</tr>
			</thead>
			<tbody>
			  <c:if test="${not empty listaTelefones}">
				<c:forEach var="telefone" items="${listaTelefones}" varStatus="i">
				
					<c:if test="${i.count % 2 eq 0}">
						<tr class="registro_clinica1">
						
						<td>${telefone.telefoneClinica}</td>
						<td>${telefone.dddClinica}</td>
						<td>${telefone.tipoTelefone.descricao}</td>
						
						</tr>
					</c:if>
					
					<c:if test="${i.count % 2 ne 0}">
						<tr class="registro_clinica2">
						
						<td>${telefone.telefoneClinica}</td>
						<td>${telefone.dddClinica}</td>
						<td>${telefone.tipoTelefone.descricao}</td>
						
					</tr>
					
					</c:if>
				
				</c:forEach>
			  </c:if>
			  <c:if test="${empty listaTelefones}">
			  	Nenhum Registro de telefone encontrado
			  </c:if>
			</tbody>
		</table>
	</div>
	
	<div class="tabela_clinica" id="listaEnderecos">
		<table border="2px">
			<thead>
				<tr>
					<th>Cidade</th>
					<th>Bairro</th>
					<th>Logradouro</th>
					<th>Cep</th>
				</tr>
			</thead>
			<tbody>
			  <c:if test="${not empty listaEnderecos}">
				<c:forEach var="endereco" items="${listaEnderecos}" varStatus="i">
				
					<c:if test="${i.count % 2 eq 0}">
						<tr class="registro_clinica1">
						
						<td>${endereco.cidade.nomeCidade}</td>
						<td>${endereco.bairroClinica}</td>
						<td>${endereco.logradouroClinica}</td>
						<td>${endereco.cepClinica}</td>
						
						</tr>
					</c:if>
					
					<c:if test="${i.count % 2 ne 0}">
						<tr class="registro_clinica2">
						
						<td>${endereco.cidade.nomeCidade}</td>
						<td>${endereco.bairroClinica}</td>
						<td>${endereco.logradouroClinica}</td>
						<td>${endereco.cepClinica}</td>
						
					</tr>
					
					</c:if>
				
				</c:forEach>
			 </c:if>
			 <c:if test="${empty listaEnderecos}">
			 	Nenhum Registro de endereço encontrado
			 </c:if>
			</tbody>
		</table>
	</div>
</body>
</html>